﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;

/// <summary>
/// Summary description for fdCertDAL
/// </summary>
public class fdCertDAL
{
	public fdCertDAL()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    public DataSet getfdCertInformationByCustId(String custId)
    {

        SqlConnection con = DBManager.getSqlConnection();

        String sql = " SELECT certNo,fName,lName,accountNo,accountType,DepositAmount,tenors,effectiveDate,maturityDate " +
                     " FROM  FIXED_DEPOSIT" +
                     " WHERE custID='" + custId + "'" + " AND status='Active';";

        SqlCommand cmd = new SqlCommand(sql, con);


        SqlDataAdapter myAdapter = new SqlDataAdapter(cmd);

        DataSet myDs = new DataSet();

        myAdapter.Fill(myDs);

        return myDs;
    }
}